Skip navigation links

Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle® Big Data Appliance Perfect Balance Java API Reference Release 1 (1.0) E41667-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.hadoop.balancer.examples.invindx
Class InvertedIndexMapreduce.InvertedIndexReducer

`java.lang.Object
org.apache.hadoop.mapreduce.Reducer<InvertedIndex.InvertedIndexKey,InvertedIndex.InvertedIndexValue,org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>
oracle.hadoop.balancer.examples.invindx.InvertedIndexMapreduce.InvertedIndexReducer`

Enclosing class:
  InvertedIndexMapreduce

      public static class InvertedIndexMapreduce.InvertedIndexReducer

extends org.apache.hadoop.mapreduce.Reducer<InvertedIndex.InvertedIndexKey,InvertedIndex.InvertedIndexValue,org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>

The inverted index reducer class for mapreduce API

Nested Class Summary

Nested classes/interfaces inherited from class org.apache.hadoop.mapreduce.Reducer
`org.apache.hadoop.mapreduce.Reducer.Context`

Constructor Summary
`InvertedIndexMapreduce.InvertedIndexReducer()`

Method Summary
`void` | `reduce(InvertedIndex.InvertedIndexKey key, java.lang.Iterable<InvertedIndex.InvertedIndexValue> values, org.apache.hadoop.mapreduce.Reducer.Context context)` The reduce function.
`void` | `setup(org.apache.hadoop.mapreduce.Reducer.Context context)`

Methods inherited from class org.apache.hadoop.mapreduce.Reducer
`run`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### InvertedIndexMapreduce.InvertedIndexReducer

    public InvertedIndexMapreduce.InvertedIndexReducer()

Method Detail

### setup

    public void setup(org.apache.hadoop.mapreduce.Reducer.Context context)

  Overrides:
    `setup` in class `org.apache.hadoop.mapreduce.Reducer<InvertedIndex.InvertedIndexKey,InvertedIndex.InvertedIndexValue,org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>`

### reduce

    public void reduce(InvertedIndex.InvertedIndexKey key,
                       java.lang.Iterable<InvertedIndex.InvertedIndexValue> values,
                       org.apache.hadoop.mapreduce.Reducer.Context context)
                throws java.io.IOException,
                       java.lang.InterruptedException

  The reduce function. The output per line is:
  - word <location:offset:numOccurrencesAtOffset>
  Since the values per key are in sorted order, we can merge consecutive duplicate locations per word.
  Overrides:
    `reduce` in class `org.apache.hadoop.mapreduce.Reducer<InvertedIndex.InvertedIndexKey,InvertedIndex.InvertedIndexValue,org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>`
  Throws:
    `java.io.IOException`
    `java.lang.InterruptedException`

Skip navigation links

Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle® Big Data Appliance Perfect Balance Java API Reference Release 1 (1.0) E41667-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.